{% extends '::base.html.twig' %}

{% block body -%}
    <div class="box">
    <h2 class="box_head">Nuevo Avion</h2>
    <div class="controls">
        <a href="#" class="grabber"></a>
        <a href="#" class="toggle"></a>
    </div>
    <div class="toggle_container">
        <div class="block">
            <form action="{{ path('aviones_create') }}" method="post" {{ form_enctype(form) }}>
                <div>
                    <div style="padding-left: 10px; color: red;">{{ form_errors(form) }}</div>
                    <fieldset class="label_side top right">
                        <label>Nombre</label>
                        <div class="clearfix">
                            {{ form_widget(form.nombre) }}
                            <span class="form-erros">
                                {{ form_errors(form.nombre) }}
                            </span>
                        </div>
                    </fieldset>
                    <fieldset class="label_side top right">
                        <label>Empresa</label>
                        <div class="clearfix">
                            {{ form_widget(form.empresa) }}
                            <span class="form-erros">
                                {{ form_errors(form.empresa) }}
                            </span>
                        </div>
                    </fieldset>
                    <fieldset class="label_side top right">
                        <label>Capacidad</label>
                        <div class="clearfix">
                            {{ form_widget(form.capacidad) }}
                            <span class="form-erros">
                                {{ form_errors(form.capacidad) }}
                            </span>
                        </div>
                    </fieldset>
                    {{ form_rest(form) }}
                </div>
                <div class="button_bar clearfix">
                    <button type="submit" class="dark green">
                        <div class="ui-icon ui-icon-check"></div>
                        <span>Guardar</span>
                    </button>
                    <a href="{{ path('aviones') }}">
                        <button type="button" class="dark red" >
                            <div class="ui-icon ui-icon-closethick"></div>
                            <span>Cancelar</span>
                        </button>
                    </a>
                </div>
            </form>
        </div>
    </div>
</div>

{% endblock %}
